package com.xuecheng.order.dao;

import com.xuecheng.framework.domain.task.XcTask;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Date;

public interface XcTaskRepository extends JpaRepository<XcTask,String> {

    /**
     * @Description 查询某个时间点之前的n条任务
     * @author ShengJinFeng
     * @date 2020/3/14
     */
    Page<XcTask> findByUpdateTimeBefore(Pageable pageable, Date updateTime);

    /**
     * @Description 根据id和版本号查询
     * @author ShengJinFeng
     * @date 2020/3/14
     */
    XcTask findByIdAndVersion(String id,int version);
}
